// File Item.h
//
// Purpose: Contains the struct for an item in the game
//
// Author : Bryson King (edited)
// Original Code Provided by: Mat Buckland 2002 (fup@ai-junkie.com)
// Date : 21 March 2013
// --------------------------------------------------------------
#ifndef ITEM_USSENTERPRISE_H
#define ITEM_USSENTERPRISE_H

#define DEBUG_SECTION

#include <string>

using namespace std;

struct SItem
{
	SItem();
	static int NextID();

	int ID;
	string Name;
	int DamageDonePerAttack;
	int AmmoInWeapon;
	bool ProjectileWeapon;
	bool ItemVisibleToPlayer;
};

class CItems
{
public:
	CItems();
	~CItems();
	void AddItem(SItem* item);
	SItem* RetrieveItem(string name);
	SItem* RetrieveItem(int index);
	string ListItems();
	SItem** RetrieveAllItems(int& count);
	SItem** RetrieveAllWeapons(int& count);
	SItem* RemoveItem(SItem* item);
	int NumberOfItems();

private:
	struct item_node
	{
		item_node* next;
		SItem* item;
	};

	item_node* m_pHeadOfList;
	item_node* m_pTailOfList;
	int m_iNumberOfItemsInList;
	int m_iNumberOfWeaponsInList;
};

#endif